package cmd

import (
	"fmt"
	"gitee.com/lllgo/opsctl/pkg/conf"
	"github.com/spf13/cobra"
)

func versionCmd() *cobra.Command {
	return &cobra.Command{
		Use:     "version",
		Short:   "显示当前版本",
		Aliases: []string{"v"},
		Run: func(cmd *cobra.Command, args []string) {
			showVersion()
		},
	}
}

func showVersion() {
	fmt.Println("当前版本为" + conf.AppVer)
}
